// --------------------------------------------------------------------------------------------
// Version: MPL 1.1/GPL 2.0/LGPL 2.1
// 
// The contents of this file are subject to the Mozilla Public License Version
// 1.1 (the "License"); you may not use this file except in compliance with
// the License. You may obtain a copy of the License at
// http://www.mozilla.org/MPL/
// 
// Software distributed under the License is distributed on an "AS IS" basis,
// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
// for the specific language governing rights and limitations under the
// License.
// 
// <remarks>
// Generated by IDLImporter from file nsIAuthPromptCallback.idl
// 
// You should use these interfaces when you access the COM objects defined in the mentioned
// IDL/IDH file.
// </remarks>
// --------------------------------------------------------------------------------------------
namespace Gecko
{
	using System;
	using System.Runtime.InteropServices;
	using System.Runtime.InteropServices.ComTypes;
	using System.Runtime.CompilerServices;
	
	
	/// <summary>
    /// Interface for callback methods for the asynchronous nsIAuthPrompt2 method.
    /// Callers MUST call exactly one method if nsIAuthPrompt2::promptPasswordAsync
    /// returns successfully. They MUST NOT call any method on this interface before
    /// promptPasswordAsync returns.
    /// </summary>
	[ComImport()]
	[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
	[Guid("bdc387d7-2d29-4cac-92f1-dd75d786631d")]
	public interface nsIAuthPromptCallback
	{
		
		/// <summary>
        /// Authentication information is available.
        ///
        /// @param aContext
        /// The context as passed to promptPasswordAsync
        /// @param aAuthInfo
        /// Authentication information. Must be the same object that was passed
        /// to promptPasswordAsync.
        ///
        /// @note  Any exceptions thrown from this method should be ignored.
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		void OnAuthAvailable([MarshalAs(UnmanagedType.Interface)] nsISupports aContext, [MarshalAs(UnmanagedType.Interface)] nsIAuthInformation aAuthInfo);
		
		/// <summary>
        /// Notification that the prompt was cancelled.
        ///
        /// @param aContext
        /// The context that was passed to promptPasswordAsync.
        /// @param userCancel
        /// If false, this prompt was cancelled by calling the
        /// the cancel method on the nsICancelable; otherwise,
        /// it was cancelled by the user.
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		void OnAuthCancelled([MarshalAs(UnmanagedType.Interface)] nsISupports aContext, [MarshalAs(UnmanagedType.U1)] bool userCancel);
	}
}
